<?php

return array(
    'bjyauthorize' => array(

        // set the 'guest' role as default (must be defined in a role provider)
        'default_role' => 'guest',
        
        'identity_provider' => 'BjyAuthorize\Provider\Identity\ZfcUserZendDb',
        
        'role_providers' => array(
        		'BjyAuthorize\Provider\Role\ZendDb' => array(
        				'table'             => 'user_role',
        				'role_id_field'     => 'role_id',
        				'parent_role_field' => 'parent_id',
        		),
        ),
       
        /* Currently, only controller and route guards exist
         *
         * Consider enabling either the controller or the route guard depending on your needs.
         */
        'guards' => array(
            /* If this guard is specified here (i.e. it is enabled), it will block
             * access to all controllers and actions unless they are specified here.
             * You may omit the 'action' index to allow access to the entire controller
             */
            
            
            'BjyAuthorize\Guard\Controller' => array(
                /*
                array('controller' => 'Application\Controller\Index', 'action' => 'index', 'roles' => array('guest','user')),
                array('controller' => 'Sales\Controller\Index', 'action' => 'index', 'roles' => array('guest','user')),
                array('controller' => 'zfcuser', 'action' => 'login', 'roles' => array('guest')),
                array('controller' => 'zfcuser', 'action' => 'index', 'roles' => array('user')),
                */
            ),

            /* If this guard is specified here (i.e. it is enabled), it will block
             * access to all routes unless they are specified here.
             */
            
            'BjyAuthorize\Guard\Route' => array(
                /*
                array('route' => 'zfcuser', 'roles' => array('user')),
                array('route' => 'zfcuser/logout', 'roles' => array('user')),
                array('route' => 'zfcuser/login', 'roles' => array('guest')),
                // array('route' => 'zfcuser/register', 'roles' => array('guest')),
                // Below is the default index action used by the ZendSkeletonApplication
                array('route' => 'home', 'roles' => array('guest', 'user')),
                */
            ),
            
        ),
    ),
);